$OpenBSD: patch-Makefile_in,v 1.1.1.1 2016/01/01 11:54:26 bentley Exp $
--- Makefile.in.orig	Sun Dec 20 01:54:19 2015
+++ Makefile.in	Sun Dec 20 01:54:40 2015
@@ -567,12 +567,12 @@ install-data-local:
 	apertium-gen-modes modes.xml apertium-$(PREFIX1)
 	rm -rf modes
 	mv modes.bak modes
-	test -d $(apertium_ht_modesdir) || mkdir $(apertium_ht_modesdir)
-	$(INSTALL_DATA) $(PREFIX1).mode $(apertium_ht_modesdir)
+	test -d $(DESTDIR)$(apertium_ht_modesdir) || mkdir $(DESTDIR)$(apertium_ht_modesdir)
+	$(INSTALL_DATA) $(PREFIX1).mode $(DESTDIR)$(apertium_ht_modesdir)
 	rm $(PREFIX1).mode 
-	$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t1x $(apertium_ht_endir)
-	$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t2x $(apertium_ht_endir)
-	$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t3x $(apertium_ht_endir)
+	$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t1x $(DESTDIR)$(apertium_ht_endir)
+	$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t2x $(DESTDIR)$(apertium_ht_endir)
+	$(INSTALL_DATA) $(BASENAME).$(PREFIX1).t3x $(DESTDIR)$(apertium_ht_endir)
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
